﻿using System;

namespace Gonte
{
    public static class ExceptionHelper
    {
        public static Exception GetInnermostException(Exception exception)
        {
            if (null == exception.InnerException)
            {
                return exception;
            }

            return GetInnermostException(exception.InnerException);
        }
    }
}
